<?php

namespace App\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * WechatCode
 *
 * @ORM\Table(name="wechat_code", uniqueConstraints={@ORM\UniqueConstraint(name="UNIQ_9A7EA0361E36857", columns={"openid"})})
 * @ORM\Entity
 */
class WechatCode
{
    /**
     * @var int
     *
     * @ORM\Column(name="id", type="integer", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;

    /**
     * @var string|null
     *
     * @ORM\Column(name="phone", type="string", length=20, nullable=true)
     */
    private $phone;

    /**
     * @var string|null
     *
     * @ORM\Column(name="code", type="string", length=255, nullable=true)
     */
    private $code;

    /**
     * @var string
     *
     * @ORM\Column(name="openid", type="string", length=255, nullable=false)
     */
    private $openid;

    /**
     * @var string
     *
     * @ORM\Column(name="addtime", type="string", length=20, nullable=false)
     */
    private $addtime;

    public function getId(): ?int
    {
        return $this->id;
    }

    public function getPhone(): ?string
    {
        return $this->phone;
    }

    public function setPhone(?string $phone): self
    {
        $this->phone = $phone;

        return $this;
    }

    public function getCode(): ?string
    {
        return $this->code;
    }

    public function setCode(?string $code): self
    {
        $this->code = $code;

        return $this;
    }

    public function getOpenid(): ?string
    {
        return $this->openid;
    }

    public function setOpenid(string $openid): self
    {
        $this->openid = $openid;

        return $this;
    }

    public function getAddtime(): ?string
    {
        return $this->addtime;
    }

    public function setAddtime(string $addtime): self
    {
        $this->addtime = $addtime;

        return $this;
    }


}
